const filter = {
  baseDateFun: function (val) {
    if (val) {
      var standardTime = new Date(Number(val));
      var y, m, d, h, f;
      y = standardTime.getFullYear();
      m = standardTime.getMonth() + 1;
      m = m > 9 ? m : "0" + m;
      d = standardTime.getDate();
      d = d > 9 ? d : "0" + d;
      h = standardTime.getHours();
      h = h > 9 ? h : "0" + h;
      f = standardTime.getMinutes();
      f = f > 9 ? f : "0" + f;
      return y + "-" + m + "-" + d;
    } else {
      return "暂无";
    }
  },
  baseStrFun: function (val) {
    if (val) {
      return val;
    } else {
      return "暂无";
    }
  },
  baseNumberFun: function (val) {
    if (val) {
      return val;
    } else {
      return "0";
    }
  }
};
export default filter;
